package cn.stronglink.assetmanage.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import cn.stronglink.assetmanage.entity.Room;
import cn.stronglink.assetmanage.entity.Asset;
import cn.stronglink.assetmanage.entity.Type;
import cn.stronglink.assetmanage.entity.PatrolDetail;
import cn.stronglink.assetmanage.entity.DataCenter;
import cn.stronglink.assetmanage.entity.Cabinet;
import cn.stronglink.assetmanage.entity.SearchAsset;
import cn.stronglink.assetmanage.entity.Inventory;
import cn.stronglink.assetmanage.entity.Department;
import cn.stronglink.assetmanage.entity.User;
import cn.stronglink.assetmanage.entity.Check;
import cn.stronglink.assetmanage.entity.SyncContent;
import cn.stronglink.assetmanage.entity.Repair;
import cn.stronglink.assetmanage.entity.Task;
import cn.stronglink.assetmanage.entity.RepailDetail;
import cn.stronglink.assetmanage.entity.Patrol;
import cn.stronglink.assetmanage.entity.SyncTypes;
import cn.stronglink.assetmanage.entity.ServerIp;
import cn.stronglink.assetmanage.entity.Brand;
import cn.stronglink.assetmanage.entity.Model;
import cn.stronglink.assetmanage.entity.InventoryDetail;

import cn.stronglink.assetmanage.dao.RoomDao;
import cn.stronglink.assetmanage.dao.AssetDao;
import cn.stronglink.assetmanage.dao.TypeDao;
import cn.stronglink.assetmanage.dao.PatrolDetailDao;
import cn.stronglink.assetmanage.dao.DataCenterDao;
import cn.stronglink.assetmanage.dao.CabinetDao;
import cn.stronglink.assetmanage.dao.SearchAssetDao;
import cn.stronglink.assetmanage.dao.InventoryDao;
import cn.stronglink.assetmanage.dao.DepartmentDao;
import cn.stronglink.assetmanage.dao.UserDao;
import cn.stronglink.assetmanage.dao.CheckDao;
import cn.stronglink.assetmanage.dao.SyncContentDao;
import cn.stronglink.assetmanage.dao.RepairDao;
import cn.stronglink.assetmanage.dao.TaskDao;
import cn.stronglink.assetmanage.dao.RepailDetailDao;
import cn.stronglink.assetmanage.dao.PatrolDao;
import cn.stronglink.assetmanage.dao.SyncTypesDao;
import cn.stronglink.assetmanage.dao.ServerIpDao;
import cn.stronglink.assetmanage.dao.BrandDao;
import cn.stronglink.assetmanage.dao.ModelDao;
import cn.stronglink.assetmanage.dao.InventoryDetailDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig roomDaoConfig;
    private final DaoConfig assetDaoConfig;
    private final DaoConfig typeDaoConfig;
    private final DaoConfig patrolDetailDaoConfig;
    private final DaoConfig dataCenterDaoConfig;
    private final DaoConfig cabinetDaoConfig;
    private final DaoConfig searchAssetDaoConfig;
    private final DaoConfig inventoryDaoConfig;
    private final DaoConfig departmentDaoConfig;
    private final DaoConfig userDaoConfig;
    private final DaoConfig checkDaoConfig;
    private final DaoConfig syncContentDaoConfig;
    private final DaoConfig repairDaoConfig;
    private final DaoConfig taskDaoConfig;
    private final DaoConfig repailDetailDaoConfig;
    private final DaoConfig patrolDaoConfig;
    private final DaoConfig syncTypesDaoConfig;
    private final DaoConfig serverIpDaoConfig;
    private final DaoConfig brandDaoConfig;
    private final DaoConfig modelDaoConfig;
    private final DaoConfig inventoryDetailDaoConfig;

    private final RoomDao roomDao;
    private final AssetDao assetDao;
    private final TypeDao typeDao;
    private final PatrolDetailDao patrolDetailDao;
    private final DataCenterDao dataCenterDao;
    private final CabinetDao cabinetDao;
    private final SearchAssetDao searchAssetDao;
    private final InventoryDao inventoryDao;
    private final DepartmentDao departmentDao;
    private final UserDao userDao;
    private final CheckDao checkDao;
    private final SyncContentDao syncContentDao;
    private final RepairDao repairDao;
    private final TaskDao taskDao;
    private final RepailDetailDao repailDetailDao;
    private final PatrolDao patrolDao;
    private final SyncTypesDao syncTypesDao;
    private final ServerIpDao serverIpDao;
    private final BrandDao brandDao;
    private final ModelDao modelDao;
    private final InventoryDetailDao inventoryDetailDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        roomDaoConfig = daoConfigMap.get(RoomDao.class).clone();
        roomDaoConfig.initIdentityScope(type);

        assetDaoConfig = daoConfigMap.get(AssetDao.class).clone();
        assetDaoConfig.initIdentityScope(type);

        typeDaoConfig = daoConfigMap.get(TypeDao.class).clone();
        typeDaoConfig.initIdentityScope(type);

        patrolDetailDaoConfig = daoConfigMap.get(PatrolDetailDao.class).clone();
        patrolDetailDaoConfig.initIdentityScope(type);

        dataCenterDaoConfig = daoConfigMap.get(DataCenterDao.class).clone();
        dataCenterDaoConfig.initIdentityScope(type);

        cabinetDaoConfig = daoConfigMap.get(CabinetDao.class).clone();
        cabinetDaoConfig.initIdentityScope(type);

        searchAssetDaoConfig = daoConfigMap.get(SearchAssetDao.class).clone();
        searchAssetDaoConfig.initIdentityScope(type);

        inventoryDaoConfig = daoConfigMap.get(InventoryDao.class).clone();
        inventoryDaoConfig.initIdentityScope(type);

        departmentDaoConfig = daoConfigMap.get(DepartmentDao.class).clone();
        departmentDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        checkDaoConfig = daoConfigMap.get(CheckDao.class).clone();
        checkDaoConfig.initIdentityScope(type);

        syncContentDaoConfig = daoConfigMap.get(SyncContentDao.class).clone();
        syncContentDaoConfig.initIdentityScope(type);

        repairDaoConfig = daoConfigMap.get(RepairDao.class).clone();
        repairDaoConfig.initIdentityScope(type);

        taskDaoConfig = daoConfigMap.get(TaskDao.class).clone();
        taskDaoConfig.initIdentityScope(type);

        repailDetailDaoConfig = daoConfigMap.get(RepailDetailDao.class).clone();
        repailDetailDaoConfig.initIdentityScope(type);

        patrolDaoConfig = daoConfigMap.get(PatrolDao.class).clone();
        patrolDaoConfig.initIdentityScope(type);

        syncTypesDaoConfig = daoConfigMap.get(SyncTypesDao.class).clone();
        syncTypesDaoConfig.initIdentityScope(type);

        serverIpDaoConfig = daoConfigMap.get(ServerIpDao.class).clone();
        serverIpDaoConfig.initIdentityScope(type);

        brandDaoConfig = daoConfigMap.get(BrandDao.class).clone();
        brandDaoConfig.initIdentityScope(type);

        modelDaoConfig = daoConfigMap.get(ModelDao.class).clone();
        modelDaoConfig.initIdentityScope(type);

        inventoryDetailDaoConfig = daoConfigMap.get(InventoryDetailDao.class).clone();
        inventoryDetailDaoConfig.initIdentityScope(type);

        roomDao = new RoomDao(roomDaoConfig, this);
        assetDao = new AssetDao(assetDaoConfig, this);
        typeDao = new TypeDao(typeDaoConfig, this);
        patrolDetailDao = new PatrolDetailDao(patrolDetailDaoConfig, this);
        dataCenterDao = new DataCenterDao(dataCenterDaoConfig, this);
        cabinetDao = new CabinetDao(cabinetDaoConfig, this);
        searchAssetDao = new SearchAssetDao(searchAssetDaoConfig, this);
        inventoryDao = new InventoryDao(inventoryDaoConfig, this);
        departmentDao = new DepartmentDao(departmentDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);
        checkDao = new CheckDao(checkDaoConfig, this);
        syncContentDao = new SyncContentDao(syncContentDaoConfig, this);
        repairDao = new RepairDao(repairDaoConfig, this);
        taskDao = new TaskDao(taskDaoConfig, this);
        repailDetailDao = new RepailDetailDao(repailDetailDaoConfig, this);
        patrolDao = new PatrolDao(patrolDaoConfig, this);
        syncTypesDao = new SyncTypesDao(syncTypesDaoConfig, this);
        serverIpDao = new ServerIpDao(serverIpDaoConfig, this);
        brandDao = new BrandDao(brandDaoConfig, this);
        modelDao = new ModelDao(modelDaoConfig, this);
        inventoryDetailDao = new InventoryDetailDao(inventoryDetailDaoConfig, this);

        registerDao(Room.class, roomDao);
        registerDao(Asset.class, assetDao);
        registerDao(Type.class, typeDao);
        registerDao(PatrolDetail.class, patrolDetailDao);
        registerDao(DataCenter.class, dataCenterDao);
        registerDao(Cabinet.class, cabinetDao);
        registerDao(SearchAsset.class, searchAssetDao);
        registerDao(Inventory.class, inventoryDao);
        registerDao(Department.class, departmentDao);
        registerDao(User.class, userDao);
        registerDao(Check.class, checkDao);
        registerDao(SyncContent.class, syncContentDao);
        registerDao(Repair.class, repairDao);
        registerDao(Task.class, taskDao);
        registerDao(RepailDetail.class, repailDetailDao);
        registerDao(Patrol.class, patrolDao);
        registerDao(SyncTypes.class, syncTypesDao);
        registerDao(ServerIp.class, serverIpDao);
        registerDao(Brand.class, brandDao);
        registerDao(Model.class, modelDao);
        registerDao(InventoryDetail.class, inventoryDetailDao);
    }
    
    public void clear() {
        roomDaoConfig.getIdentityScope().clear();
        assetDaoConfig.getIdentityScope().clear();
        typeDaoConfig.getIdentityScope().clear();
        patrolDetailDaoConfig.getIdentityScope().clear();
        dataCenterDaoConfig.getIdentityScope().clear();
        cabinetDaoConfig.getIdentityScope().clear();
        searchAssetDaoConfig.getIdentityScope().clear();
        inventoryDaoConfig.getIdentityScope().clear();
        departmentDaoConfig.getIdentityScope().clear();
        userDaoConfig.getIdentityScope().clear();
        checkDaoConfig.getIdentityScope().clear();
        syncContentDaoConfig.getIdentityScope().clear();
        repairDaoConfig.getIdentityScope().clear();
        taskDaoConfig.getIdentityScope().clear();
        repailDetailDaoConfig.getIdentityScope().clear();
        patrolDaoConfig.getIdentityScope().clear();
        syncTypesDaoConfig.getIdentityScope().clear();
        serverIpDaoConfig.getIdentityScope().clear();
        brandDaoConfig.getIdentityScope().clear();
        modelDaoConfig.getIdentityScope().clear();
        inventoryDetailDaoConfig.getIdentityScope().clear();
    }

    public RoomDao getRoomDao() {
        return roomDao;
    }

    public AssetDao getAssetDao() {
        return assetDao;
    }

    public TypeDao getTypeDao() {
        return typeDao;
    }

    public PatrolDetailDao getPatrolDetailDao() {
        return patrolDetailDao;
    }

    public DataCenterDao getDataCenterDao() {
        return dataCenterDao;
    }

    public CabinetDao getCabinetDao() {
        return cabinetDao;
    }

    public SearchAssetDao getSearchAssetDao() {
        return searchAssetDao;
    }

    public InventoryDao getInventoryDao() {
        return inventoryDao;
    }

    public DepartmentDao getDepartmentDao() {
        return departmentDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public CheckDao getCheckDao() {
        return checkDao;
    }

    public SyncContentDao getSyncContentDao() {
        return syncContentDao;
    }

    public RepairDao getRepairDao() {
        return repairDao;
    }

    public TaskDao getTaskDao() {
        return taskDao;
    }

    public RepailDetailDao getRepailDetailDao() {
        return repailDetailDao;
    }

    public PatrolDao getPatrolDao() {
        return patrolDao;
    }

    public SyncTypesDao getSyncTypesDao() {
        return syncTypesDao;
    }

    public ServerIpDao getServerIpDao() {
        return serverIpDao;
    }

    public BrandDao getBrandDao() {
        return brandDao;
    }

    public ModelDao getModelDao() {
        return modelDao;
    }

    public InventoryDetailDao getInventoryDetailDao() {
        return inventoryDetailDao;
    }

}
